/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package semantica.tipos;

/**
 *
 * @author Javi
 */
public class TipoArray extends Tipo{
    
    int numElems;
    Tipo tipoBase;
    
    public TipoArray(int n, Tipo tb){
        this.tipo = "array";
        this.numElems = n;
        this.tipoBase = tb;
        this.tam = n * tb.tam;
    }
    
    public Tipo getTipoBase(){
        return this.tipoBase;
    }
    
    public int getNumElem(){
        return this.numElems;
    }
    
    public int getTam(){
        return this.tam;
    }
}